<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>java基础：data&amp;calendar | haijd</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="Java基础" />
  
  
  
  
  <meta name="description" content="Java基础：Data&amp;Calendar">
<meta name="keywords" content="Java基础">
<meta property="og:type" content="article">
<meta property="og:title" content="Java基础：Data&amp;Calendar">
<meta property="og:url" content="http://www.hais2.com/2017/05/25/Java基础：Data-Calendar/index.html">
<meta property="og:site_name" content="haijd">
<meta property="og:description" content="Java基础：Data&amp;Calendar">
<meta property="og:locale" content="default">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg">
<meta property="og:updated_time" content="2017-12-13T12:25:59.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Java基础：Data&amp;Calendar">
<meta name="twitter:description" content="Java基础：Data&amp;Calendar">
<meta name="twitter:image" content="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg">
  
    <link rel="alternate" href="/atom.xml" title="haijd" type="application/atom+xml">
  
  <link rel="icon" href="/css/images/favicon.ico">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/9749f0/00000000000000000001008f/27/l?subset_id=2&fvd=n5) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/90cf9f/000000000000000000010091/27/l?subset_id=2&fvd=n7) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/8a5494/000000000000000000013365/27/l?subset_id=2&fvd=n4) format("woff2");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/d337d8/000000000000000000010095/27/l?subset_id=2&fvd=i4) format("woff2");font-weight:400;font-style:italic;}</style>
    
  <link rel="stylesheet" id="athemes-headings-fonts-css" href="//fonts.googleapis.com/css?family=Yanone+Kaffeesatz%3A200%2C300%2C400%2C700&amp;ver=4.6.1" type="text/css" media="all">
  <link rel="stylesheet" href="/css/style.css">

  <script src="/js/jquery-3.1.1.min.js"></script>

  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/css/bootstrap.css" >
  <link rel="stylesheet" href="/css/hiero.css" >
  <link rel="stylesheet" href="/css/glyphs.css" >
  
    <link rel="stylesheet" href="/css/vdonate.css" >
  

</head>

<script>
var themeMenus = {};

  themeMenus["/"] = "Home"; 

  themeMenus["/archives"] = "Archives"; 

  themeMenus["/categories"] = "Categories"; 

  themeMenus["/tags"] = "Tags"; 

  themeMenus["/about"] = "About"; 

</script>


  <body data-spy="scroll" data-target="#toc" data-offset="50">


  <header id="allheader" class="site-header" role="banner">
  <div class="clearfix container">
      <div class="site-branding">

          <h1 class="site-title">
            
              <a href="/" title="haijd" rel="home"> haijd </a>
            
          </h1>

          
            <div class="site-description">Stay Hungry,Stay Foolish</div>
          
            
          <nav id="main-navigation" class="main-navigation" role="navigation">
            <a class="nav-open">Menu</a>
            <a class="nav-close">Close</a>
            <div class="clearfix sf-menu">

              <ul id="main-nav" class="nmenu sf-js-enabled">
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/">Home</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/archives">Archives</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/categories">Categories</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/tags">Tags</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/about">About</a> </li>
                    
              </ul>
            </div>
          </nav>


      </div>
  </div>
</header>




  <div id="container">
    <div id="wrap">
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-Java基础：Data-Calendar" style="width: 66%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
  <div id="articleInner" class="clearfix post-1016 post type-post status-publish format-standard has-post-thumbnail hentry category-template-2 category-uncategorized tag-codex tag-edge-case tag-featured-image tag-image tag-template">
    
<div class="article-gallery">
  <div class="article-gallery-photos">
    
      <a class="article-gallery-img fancybox" href="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg" rel="gallery_cjie4nahi00473swa5t5jc5b2">
        <img src="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg" itemprop="image">
      </a>
    
  </div>
</div>

    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      Java基础：Data&amp;Calendar
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	Posted on <a href="/2017/05/25/Java基础：Data-Calendar/" class="article-date">
	  <time datetime="2017-05-25T11:18:10.000Z" itemprop="datePublished">May 25, 2017</time>
	</a>

      
	<span id="busuanzi_container_page_pv">
	  本文总阅读量<span id="busuanzi_value_page_pv"></span>次
	</span>

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <!-- TOC -->
<ul>
<li><a href="#date类的构造方法">Date类的构造方法</a></li>
<li><a href="#date类的get和set方法">Date类的get和set方法</a></li>
<li><a href="#日期格式化simpledateformat">日期格式化SimpleDateFormat</a></li>
<li><a href="#字符串转成日期对象">字符串转成日期对象</a></li>
<li><a href="#calendar类">Calendar类</a></li>
<li><a href="#setint-fieldint-value和addint-field-int-value的区别">set(int field,int value)和add(int field, int value)的区别</a></li>
</ul>
<!-- /TOC -->
<h3 id="Date类的构造方法"><a href="#Date类的构造方法" class="headerlink" title="Date类的构造方法"></a>Date类的构造方法</h3><ul>
<li>Date类的构造方法<ul>
<li>空参构造<ul>
<li><code>public Date()</code></li>
</ul>
</li>
<li>带参构造<ul>
<li><code>public Date(long times)</code></li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="Date类的get和set方法"><a href="#Date类的get和set方法" class="headerlink" title="Date类的get和set方法"></a>Date类的get和set方法</h3><ul>
<li>Date类的get和set方法<ul>
<li><code>public long getTime()</code>    <ul>
<li>将当前的日期对象，转为对应的毫秒值</li>
</ul>
</li>
<li><code>public void setTime(long times);</code><ul>
<li>根据给定的毫秒值，生成对应的日期对象</li>
</ul>
</li>
</ul>
</li>
</ul>
<a id="more"></a>
<h3 id="日期格式化SimpleDateFormat"><a href="#日期格式化SimpleDateFormat" class="headerlink" title="日期格式化SimpleDateFormat"></a>日期格式化SimpleDateFormat</h3><ul>
<li>日期格式化SimpleDateFormat<ul>
<li>SimpleDateFormat函数的继承关系：<br>java.lang.Object<br>   |<br>   +—-java.text.Format<pre><code>|
+----java.text.DateFormat
        |
        +----java.text.SimpleDateFormat
</code></pre><ul>
<li>对日期进行格式化(自定义)<ul>
<li>对日期格式化的类 <code>java.text.DateFormat</code> 抽象类, 普通方法,也有抽象的方法</li>
<li>实际使用是子类 <code>java.text.SimpleDateFormat</code> 可以使用父类普通方法,重写了抽象方法</li>
</ul>
</li>
<li>对日期进行格式化的步骤<ul>
<li>创建<code>SimpleDateFormat</code>对象<ul>
<li>在类构造方法中,写入字符串的日期格式 (自己定义)</li>
</ul>
</li>
<li><code>SimpleDateFormat</code>调用方法format对日期进行格式化<ul>
<li><code>public String format(Date date)</code> 传递日期对象,返回字符串</li>
<li>日期模式:<ul>
<li>yyyy    年份</li>
<li>MM      月份<ul>
<li>dd      月中的天数</li>
<li>HH       0-23小时</li>
<li>mm      小时中的分钟</li>
</ul>
</li>
<li>ss      秒</li>
<li>yyyy年MM月dd日 HH点mm分钟ss秒<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">SimpleDateFormat myFmt=<span class="keyword">new</span> SimpleDateFormat(<span class="string">"yyyy年MM月dd日 HH时mm分ss秒"</span>);</span><br><span class="line">SimpleDateFormat myFmt1=<span class="keyword">new</span> SimpleDateFormat(<span class="string">"yy/MM/dd HH:mm"</span>); </span><br><span class="line">Date now=<span class="keyword">new</span> Date();</span><br><span class="line">System.out.println(myFmt.format(now));  <span class="comment">//输出：2017年05月25日 18时17分35秒</span></span><br><span class="line">System.out.println(myFmt1.format(now)); <span class="comment">//输出：17/05/25 18:17</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="字符串转成日期对象"><a href="#字符串转成日期对象" class="headerlink" title="字符串转成日期对象"></a>字符串转成日期对象</h3><ul>
<li>字符串转成日期对象<ul>
<li>使用步骤<ul>
<li>创建SimpleDateFormat的对象<ul>
<li>构造方法中,指定日期模式</li>
</ul>
</li>
<li>子类对象,调用方法 parse 传递String,返回Date<ul>
<li>注意: 时间和日期的模式yyyy-MM-dd, 必须和字符串中的时间日期匹配<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">SimpleDateFormat myFmt=<span class="keyword">new</span> SimpleDateFormat(<span class="string">"yyyy年MM月dd日 HH时mm分ss秒"</span>);</span><br><span class="line">String now = <span class="string">"2017年05月25日 18时17分35秒"</span>;</span><br><span class="line">System.out.println(myFmt.parse(now));  <span class="comment">//输出：Thu May 25 18:17:35 CST 2017</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="Calendar类"><a href="#Calendar类" class="headerlink" title="Calendar类"></a>Calendar类</h3><ul>
<li>日历类(抽象类)<ul>
<li>所在包：<code>java.util.Calendar</code></li>
</ul>
</li>
<li>创建对象<ul>
<li><code>Calendar</code>类写了静态方法 <code>getInstance()</code> 直接返回了子类的对象</li>
<li>不需要直接new子类的对象,通过静态方法直接获取</li>
</ul>
</li>
<li><p>成员方法</p>
<ul>
<li><code>getTime()</code> 把日历对象,转成Date日期对象</li>
<li><code>get(int field)</code> 获取指定日期类型的值<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">Calendar c = Calendar.getInstance();</span><br><span class="line"><span class="comment">// 获取年份</span></span><br><span class="line"><span class="keyword">int</span> year = c.get(Calendar.YEAR);</span><br><span class="line"><span class="comment">// 获取月份</span></span><br><span class="line"><span class="keyword">int</span> month = c.get(Calendar.MONTH) + <span class="number">1</span>;</span><br><span class="line"><span class="comment">// 获取天数</span></span><br><span class="line"><span class="keyword">int</span> day = c.get(Calendar.DAY_OF_MONTH);</span><br><span class="line">System.out.println(year + <span class="string">"年"</span> + month + <span class="string">"月"</span> + day + <span class="string">"日"</span>);</span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
<li><p>成员方法<br>   <code>set(int field,int value)</code>  给指定的日期类型设置时间 (field代表了Calendar定义的一些字段，例如:Calendar.YEAR=1，再这里写1和Calendar.YEAR都可以，都是int常量数值，但是推荐使用Calendar.YEAR这种形式，因为比较容易识别，也不容易写错)<br>   <code>set(int year, int month, int date)</code>  设置指定的时间</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">CalendarFunc</span><span class="params">()</span> </span>&#123;</span><br><span class="line">	Calendar c = Calendar.getInstance();</span><br><span class="line">	<span class="comment">// 设置,月份,设置到10月分</span></span><br><span class="line">	c.set(Calendar.MONTH, <span class="number">9</span>);</span><br><span class="line">	<span class="comment">// 设置年,月,日</span></span><br><span class="line">	c.set(<span class="number">2017</span>, <span class="number">5</span>, <span class="number">25</span>);</span><br><span class="line">	<span class="comment">// 获取年份</span></span><br><span class="line">	<span class="keyword">int</span> year = c.get(Calendar.YEAR);</span><br><span class="line">	<span class="comment">// 获取月份</span></span><br><span class="line">	<span class="keyword">int</span> month = c.get(Calendar.MONTH);</span><br><span class="line">	<span class="comment">// 获取天数</span></span><br><span class="line">	<span class="keyword">int</span> day = c.get(Calendar.DAY_OF_MONTH);</span><br><span class="line">	System.out.println(year + <span class="string">"年"</span> + month + <span class="string">"月"</span> + day + <span class="string">"日"</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>成员方法</p>
<ul>
<li><code>add(int field, int value)</code> 进行整数的偏移(给当前日期类型增加或减少)<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">function_2</span><span class="params">()</span> </span>&#123;</span><br><span class="line">	Calendar c = Calendar.getInstance();</span><br><span class="line">	<span class="comment">// 让日历中的天数,向后移90天</span></span><br><span class="line">	c.add(Calendar.DAY_OF_MONTH, -<span class="number">90</span>);</span><br><span class="line">	<span class="comment">// 获取年份</span></span><br><span class="line">	<span class="keyword">int</span> year = c.get(Calendar.YEAR);</span><br><span class="line">	<span class="comment">// 获取月份</span></span><br><span class="line">	<span class="keyword">int</span> month = c.get(Calendar.MONTH) + <span class="number">1</span>;</span><br><span class="line">	<span class="comment">// 获取天数</span></span><br><span class="line">	<span class="keyword">int</span> day = c.get(Calendar.DAY_OF_MONTH);</span><br><span class="line">	System.out.println(year + <span class="string">"年"</span> + month + <span class="string">"月"</span> + day + <span class="string">"日"</span>);  <span class="comment">//输出：2017年3月27日</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
</ul>
<h3 id="set-int-field-int-value-和add-int-field-int-value-的区别"><a href="#set-int-field-int-value-和add-int-field-int-value-的区别" class="headerlink" title="set(int field,int value)和add(int field, int value)的区别"></a>set(int field,int value)和add(int field, int value)的区别</h3><ul>
<li>add：调整时间，在当前的时间的基础上增加或者减少，超过最大值，会全部增加。</li>
<li>set：设置时间，直接将指定的日期类型设置成指定的值，超过类型的最大值，会自动计算，例如set(Calendar.MONTH,13)，那么就会折合成1年零一个月，年份增加1年，月份为折合后的余数。<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">Calendar c = Calendar.getInstance();</span><br><span class="line">c.set(<span class="number">2017</span>,<span class="number">5</span>, <span class="number">25</span>);</span><br><span class="line">c.set(Calendar.MONTH,<span class="number">1</span>);    <span class="comment">//获得：2017-1-25</span></span><br><span class="line">c.set(Calendar.MONTH,<span class="number">13</span>);   <span class="comment">//获得：2018-1-25</span></span><br><span class="line"></span><br><span class="line">c.add(Calendar.MONTH, <span class="number">1</span>);   <span class="comment">//获得：2017-6-25</span></span><br><span class="line">c.add(Calendar.MONTH, <span class="number">13</span>);  <span class="comment">//获得：2018-6-25</span></span><br></pre></td></tr></table></figure>
</li>
</ul>

      
    </div>
    <footer class="entry-meta entry-footer">
      
	<span class="ico-folder"></span>
    <a class="article-category-link" href="/categories/Java/">Java</a>

      
  <span class="ico-tags"></span>
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Java基础/">Java基础</a></li></ul>

      
        <div id="donation_div"></div>

<script src="/js/vdonate.js"></script>
<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: '/css/images/wechatPay.png',
  alipayImage: '/css/images/alipay.jpg'
});
</script>
      

      
        
	<section id="comments" class="comment">
	  <div id="disqus_thread">
	  <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
	  </div>
	</section>

	<script type="text/javascript">
	var disqus_shortname = 'haijdblog';
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/count.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	</script>


      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2017/05/27/Java基础：包装类/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Java基础：JAVA基本类型和包装类
        
      </div>
    </a>
  
  
    <a href="/2017/05/22/Java基础：正则表达式/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Java基础：正则表达式</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
      <ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#Date类的构造方法"><span class="nav-number">1.</span> <span class="nav-text">Date类的构造方法</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Date类的get和set方法"><span class="nav-number">2.</span> <span class="nav-text">Date类的get和set方法</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#日期格式化SimpleDateFormat"><span class="nav-number">3.</span> <span class="nav-text">日期格式化SimpleDateFormat</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#字符串转成日期对象"><span class="nav-number">4.</span> <span class="nav-text">字符串转成日期对象</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Calendar类"><span class="nav-number">5.</span> <span class="nav-text">Calendar类</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#set-int-field-int-value-和add-int-field-int-value-的区别"><span class="nav-number">6.</span> <span class="nav-text">set(int field,int value)和add(int field, int value)的区别</span></a></li></ol>
    
    </div>
  </aside>
</section>
        
      </div>
      <footer id="footer" class="site-footer">
  

  <div class="clearfix container">
      <div class="site-info">
	      &copy; 2018 haijd All Rights Reserved.
          
            <span id="busuanzi_container_site_uv">
              本站访客数<span id="busuanzi_value_site_uv"></span>人次  
              本站总访问量<span id="busuanzi_value_site_pv"></span>次
            </span>
          
      </div>
      <div class="site-credit">
        Theme by <a href="https://github.com/iTimeTraveler/hexo-theme-hiero" target="_blank">hiero</a>
      </div>
  </div>
</footer>


<!-- min height -->

<script>
    var contentdiv = document.getElementById("content");

    contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("allheader").offsetHeight - document.getElementById("footer").offsetHeight + "px";
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/categories" class="mobile-nav-link">Categories</a>
  
    <a href="/tags" class="mobile-nav-link">Tags</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/scripts.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/main.js"></script>








	<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/js/totop.js" async=""></script>
</body>
</html>
